package com.mvp.shq.washer.entity;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/9/4.
 */

public class RechargeResponse {

    /**
     * payType : 0   0 微信，1 支付宝
     * rechargeMoneyType : string
     * userId : string
     */

    private int payType;
    private String rechargeMoneyType;
    private String userId;
    private BigDecimal rechargeMoney;

    public static RechargeResponse objectFromData(String str) {

        return new Gson().fromJson(str, RechargeResponse.class);
    }

    public static List<RechargeResponse> arrayRechargeResponseFromData(String str) {

        Type listType = new TypeToken<ArrayList<RechargeResponse>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getPayType() {
        return payType;
    }

    public void setPayType(int payType) {
        this.payType = payType;
    }

    public String getRechargeMoneyType() {
        return rechargeMoneyType;
    }

    public void setRechargeMoneyType(String rechargeMoneyType) {
        this.rechargeMoneyType = rechargeMoneyType;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public BigDecimal getRechargeMoney() {
        return rechargeMoney;
    }

    public void setRechargeMoney(BigDecimal rechargeMoney) {
        this.rechargeMoney = rechargeMoney;
    }
}
